Repository navigation
docs: asm def-sets hold every asm-written local of the enclosing blocks - #481
Merged
Merged
Conversation
msvc-backend.md's slot-tiebreak section said an __asm block's def-set is the locals that block writes. slot_probe.py shows more: every asm block puts into its def-set each local that any asm block of the function writes, if the local is declared in a block that contains it, wherever in that block. So a local written by only some blocks weighs more than its own references, a declaration moved within the function's block does not change it, and an inner block holding only the asm that uses it does. Point 3 is corrected (with its +1 / +2 / +3 counts), a paragraph gives the lever with the probe's numbers (renderUnitAnimationWithBlendingUnk, the one function traced for it so far: 10 at the top, 6 in the else block, which gives the original's slots), and slot_probe.py's docstring says the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gynt
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The slot-tiebreak section of
tools/compiler-internals/msvc-backend.md(point 3 of "The slot tiebreak, decoded") said an__asmblock's def-set is the locals that block writes. It holds more than that, and the difference moves slots.What
slot_probe.pyshows. Every asm block puts into its def-set each local that any asm block of the function writes, as long as the local is declared in a block that contains it. Where in that block the declaration stands does not matter. The def-set is walked twice per block, so such a local gets +2 from every asm block inside its declaring block, even one that never names it.In
TextureRenderCore::renderUnitAnimationWithBlendingUnk(0x00451E00: four asm blocks, a 0x1c frame, soQSortColorsdoes not run) only the last two blocks writecolumnOffset:columnOffsetdeclared-4, above the three locals the original has there (weights 7, 7, 6)ifthat holds the first two blocks, or just before the third-4elsethat holds the last two blocks-16, the original's; every local at the original's offsetThe
elsealone takes the function from 92.5% to 96.0%. With/GL(together withInitBlendFilterArraysUnk) and two store orders it reaches 100% in #480.What changes
slot_probe.py's docstring described the def-set the old way and now says the same as the doc.Documentation only: the
slot_probe.pychange is to its docstring, and no game source, header or build file changes, so no function's match percentage can move.Other PRs. #366 and #396 also change
msvc-backend.md(#396 alsoslot_probe.py), in other places:git merge-treemerges both with this branch exactly as with main.🤖 Generated with Claude Code